package com.example.night.data.Good;

import jakarta.persistence.*;
import lombok.Data;

@Data

public class GoodsRanking implements Comparable<GoodsRanking> {


    private GoodPackage goodPackage;

    private int rank;  // 商品排名

    public GoodsRanking(GoodPackage goodPackage, int rank) {
        this.goodPackage = goodPackage;
        this.rank = rank;
    }

    @Override
    public int compareTo(GoodsRanking other) {
        return Integer.compare(this.rank, other.rank);
    }
}
